% This function runs svmtest.m on all files in a folder and then saves the
% result.
% note that itemvec should simply be a vector of all the numbered elements
% you want to run svmtest on, so if you want to run svmtest on images 8
% through 14, itemvec = [8:14]
function result_table = svmtestd(folder, itemvec, svmstruct, varargin)
    result_table = cell(length(itemvec), 2); % resulttable is the table of results.
    for i = 1:length(itemvec)
        target = pathology_init_data([folder, ' ', num2str(itemvec(i))]);
        result_table{i, 1} = target.file;
        result_table{i, 2} = svmtest(target, svmstruct, varargin);
    end;
return;